import tools.py.tools as pytools

res = pytools.build_tree_string() 
with open('mod_template/.modframe','w',encoding='utf-8') as f:
    f.write(res)